<template>
  <div class="article-page">
    <van-list v-model:loading="loading" finished-text="没有更多了" @load="onLoad" :finished="isFinished">
      <article-item :item="item" v-for="item in queryList.rows" :key="item.id"></article-item>
    </van-list>
  </div>
</template>
<script lang="ts" setup>
import ArticleItem from '@/views/article/components/article-item.vue';
import { useLikeCollect } from '@/utils/hooks'
const { optType } = defineProps<{
  optType: 1 | 2
}>()
const { isFinished, loading, onLoad, queryList } = useLikeCollect(optType)
</script>
<style scoped>
.article-page {
  margin-bottom: 50px;
  margin-top: 44px;
}
</style>